package com.ishopping.api.manage.entity;

import com.ishopping.api.manage.entity.Permission;

import java.util.List;

/**
 * Created by JIM on 2016/8/10.
 * 自定义Authentication对象，使得Subject除了携带用户的登录名外还可以携带更多信息.
 */
public class ShiroUser implements java.io.Serializable {
    //用户id
    private Long id;

    //用户名称
    private String username;

    //菜单
    private List<Permission> menus;

    public ShiroUser() {
    }

    public ShiroUser(Long id, String username, List<Permission> menus) {
        this.id = id;
        this.username = username;
        this.menus = menus;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public List<Permission> getMenus() {
        return menus;
    }

    public void setMenus(List<Permission> menus) {
        this.menus = menus;
    }
}
